package mediator;

/**
 * @Author liangliangzhao
 * @data 2023/4/19 11:55
 */

public class TV extends Colleague {
    public TV(Mediator mediator, String name) {
        super(mediator, name);
        mediator.Register(name, this);
    }
    @Override
    public void SendMessage(int stateChange) {
        this.GetMediator().GetMessage(stateChange, this.name);
    }
    public void StartTv() {
        System.out.println("打开TV");
    }
    public void StopTv() {
        System.out.println("关闭TV");
    }
}
